package DDL;

import java.io.File;

public class DeleteTable {
	public static boolean deleteTable(String dataBaseName, String tableName) {
		File tableFile1 = new File("D:\\database\\" + dataBaseName + "\\"  
				+ tableName + ".dbf");
		File tableFile2 = new File("D:\\database\\" + dataBaseName + "\\"
				+ tableName + ".dat");
		if(!tableFile1.exists()){//||!tableFile2.exists() 。dbf文件一定存在，。dat文件不一定存在
			return false;
		}
		else {
			tableFile1.delete(); //删除文件
			tableFile2.delete();
		}	
		System.out.println("删除成功！");
		return true;	
	}
}
